import request from '@/utils/request'

const api_name = '/admin/product/skuInfo'
import {call} from "@/utils/rpc";
export default {

  getPageList(page, limit, searchObj) {
    searchObj.page = page
    searchObj.limit = limit
    return call("admin/product/skuInfo/list",searchObj)
  },
  getById(id) {
    return call("admin/product/skuInfo/getById",{_id:id})
  },

  save(role) {
    return call("admin/product/skuInfo/save",role)
  },

  updateById(role) {
    return call("admin/product/skuInfo/edit",role)
  },
  removeById(id) {
    return call("admin/product/skuInfo/delete",[id])
  },
  removeRows(idList) {
    return call("admin/product/skuInfo/delete",idList)
  },

  //商品上架
  publish(id, status) {
    return call("admin/product/skuInfo/update",{_id:id,publishStatus:status})
  },

  //商品审核
  check(id, status) {
    return call("admin/product/skuInfo/update",{_id:id,checkStatus:status})

  },

  //新人专享
  isNewPerson(id, status) {
    return call("admin/product/skuInfo/update",{_id:id,isNewPerson:status})
  },
}
